package io.bluefw.blueui.dsl.render.widget;

import io.bluefw.blueui.dsl.Widget;

public class ComboBoxWidget extends WidgetRender {
	public ComboBoxWidget(Widget widget) {
		super("combobox.ftl");
		this.widget = widget;
	}
	
	public StringBuffer render() {
		widget.getProps().putIfAbsent("source", 
				widget.getEntity().getEnumItems(widget.getBinding()));
		return freemarker.render(this, this.getTemplateName());
	}
}
